Skip to main content

🔀 Switch

The Switch action allows you to create multiple conditional branches based on the value of a selected variable. It enables you to define different cases, each triggering specific actions when matched.


Configuration​

  • Variable: Select the variable whose value will be evaluated to determine which case to execute.
  • Cases: Define one or more cases with specific values or conditions. For each case:
    • Enter the case detail or value to match against the variable.
    • Add or remove cases using the plus (+) and delete (x) buttons.

Features​

  • Supports multiple case conditions for a single variable.
  • Enables branching logic similar to switch/case statements in programming.
  • Easy to add or remove cases dynamically.
  • Executes the action(s) associated with the matching case.

Use Cases​

  • Route Pageflows based on the status or type of a variable.
  • Handle multiple scenarios in decision logic without complex nested If conditions.
  • Trigger different actions based on user input or system state.
  • Simplify Pageflows branching for better readability and maintenance.

Notes​

  • Ensure the variable type is compatible with the case values.
  • Cases are evaluated in the order they are defined.
  • Define a default case if needed (not shown in UI) to handle unmatched values.
  • Use meaningful case values for clarity.

Tip: Combine Switch with nested actions to build clean, scalable decision Pageflows.